package com.jacobson.huobi.utils

import android.os.CountDownTimer
import android.widget.TextView

class VertiCodeTimer(millisInFuture: Long, countDownInterval: Long, tv: TextView) :
    CountDownTimer(millisInFuture, countDownInterval) {

    var tv : TextView = tv

    override fun onFinish() {
       tv.text = "获取验证码"
        tv.isClickable = true
    }

    override fun onTick(l: Long) {
        var time: String = (l / 1000).toString() + "秒"
        tv.text = time
        tv.isClickable = false
    }
}